package com.yinhai.message.api.bean;

import java.io.File;
import java.util.Date;
import java.util.List;

/**
 * 消息发送实体
 * @author maxp 2017年3月15日11:39:52
 */
public class TMMessage implements IMessage {

	private static final long serialVersionUID = 1L;
	private String mgid;
    private String title;     //只用于发送短信
    private String content;   //消息内容实体 html文本
    private String text;	  //消息内容 普通文本
    private List<String> messageTypes;//消息类型:指定消息的发送类型,没有指定就按照优先级发送
    private Date createDate;
    
    private String scriptMethod ="messageDwr"; //dwr js接收函数
    private List<File> files; //邮件附件:总大小限制5m

    private String selfType;    //自定义通知类型
    private String otherData1;  //保留字段1
    private String otherData2;	//保留字段2
    private String otherData3;	//保留字段3
    
    /**
     * 当messageTypes 中有微信时需要设置
     * 微信需要配置的属性 默认false
     */
    private boolean toAlluser = false;  
    /**
     * toAlluser 为false 时  推送给指定的 userList
     * 根据 openId 或者 UnionId 判定  
     * 默认 openId
     */
    private String userSign = "openId";
    /**
     * 当messageTypes 中有微信时需要设置
     * 微信的消息类型 
     */
    private String msgtype;  
    /**
     * 微信 复杂消息的 数据体 eg。图文消息（news），卡券（wxcard）， 地理位置 （music）
     */
    private String jsonData;
    private String description; //微信使用
    private String url;
    private String picurl;
	public String getMgid() {
		return mgid;
	}
	public void setMgid(String mgid) {
		this.mgid = mgid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public List<File> getFiles() {
		return files;
	}
	public void setFiles(List<File> files) {
		this.files = files;
	}
	public List<String> getMessageTypes() {
		return messageTypes;
	}
	public void setMessageTypes(List<String> messageTypes) {
		this.messageTypes = messageTypes;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getScriptMethod() {
		return scriptMethod;
	}
	public void setScriptMethod(String scriptMethod) {
		this.scriptMethod = scriptMethod;
	}

	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public boolean isToAlluser() {
		return toAlluser;
	}
	public void setToAlluser(boolean toAlluser) {
		this.toAlluser = toAlluser;
	}
	public String getUserSign() {
		return userSign;
	}
	public void setUserSign(String userSign) {
		this.userSign = userSign;
	}
	public String getMsgtype() {
		return msgtype;
	}
	public void setMsgtype(String msgtype) {
		this.msgtype = msgtype;
	}
	public String getJsonData() {
		return jsonData;
	}
	public void setJsonData(String jsonData) {
		this.jsonData = jsonData;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getPicurl() {
		return picurl;
	}
	public void setPicurl(String picurl) {
		this.picurl = picurl;
	}
	public String getSelfType() {
		return selfType;
	}
	public void setSelfType(String selfType) {
		this.selfType = selfType;
	}
	public String getOtherData1() {
		return otherData1;
	}
	public void setOtherData1(String otherData1) {
		this.otherData1 = otherData1;
	}
	public String getOtherData2() {
		return otherData2;
	}
	public void setOtherData2(String otherData2) {
		this.otherData2 = otherData2;
	}
	public String getOtherData3() {
		return otherData3;
	}
	public void setOtherData3(String otherData3) {
		this.otherData3 = otherData3;
	}
	
}
